const routes = () => {
  const router = [
    {
      path: '/',
      component: '../layouts/BasicLayout',
      routes: [
        {
          path: '/',
          redirect: '/index',
        },
        {
          path: 'index',
          component: './index',
          name: '首页',
          title: '首页',
        },
        {
          path: 'standard',
          name: '标准实体',
          title: '标准实体',
          routes: [
            {
              path: ':apiKey',
              name: '实体信息',
              title: '实体信息',
              component: './StandardList/index',
            },
          ],
        },
        {
          path: 'customize',
          name: '自定义实体',
          title: '自定义实体',
          routes: [
            {
              path: "controller",
              name:'自定义实体管理',
              title: '自定义实体管理',
              component: './CustomizeList/index',
            },
          ],
        },
        {
          path: 'entity',
          name: '所有实体',
          title: '所有实体',
          routes: [
            {
              path: "controller",
              name:'查看所有实体信息',
              title: '查看所有实体信息',
              component: './EntityList/index',
            },
          ],
        },
        {
          path: 'track',
          name: '统计分析',
          title: '统计分析',
          routes: [
            {
              path: 'index',
              name: '统计分析设计',
              title: '统计分析设计',
              component: './Track/index',
            },
          ],
        },
        {
          path: 'RBAC',
          name: '用户权限管理',
          title: '用户权限管理',
          routes: [
            {
              path: 'user',
              name: '用户',
              title: '用户',
              component: './RBAC/User/index',
            },
            {
              path: 'role_access',
              name: '角色权限',
              title: '角色权限',
              component: './RBAC/Role/index',
            },
            {
              path: 'department',
              name: '部门',
              title: '部门',
              component: './RBAC/Department/index',
            },
          ],
        },
      ],
    },

    {
      component: './404',
    },
  ];
  return router;
};
export default routes;
